package com.pt25.base.dep.nacos.encrypt;

import jakarta.annotation.Resource;
import org.jasypt.encryption.StringEncryptor;
import org.springframework.stereotype.Component;


@Component
public class EncryptUtil {

    @Resource(name = "primaryEncryptor")
    private StringEncryptor primaryEncryptor;

    public String encrypt(String value) {
        return primaryEncryptor.encrypt(value);
    }

    public String decrypt(String encryptValue) {
        return primaryEncryptor.decrypt(encryptValue);
    }
}
